#include "settingswidget.h"
#include "ui_settingswidget.h"

SettingsWidget::SettingsWidget(QWidget *parent, IcySettings *fSettings) :
    QWidget(parent),
    ui(new Ui::SettingsWidget)
{
    ui->setupUi(this);
    settings = fSettings;
}

SettingsWidget::~SettingsWidget()
{
    delete ui;
}

void SettingsWidget::changeEvent(QEvent *e)
{
    QWidget::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}

void SettingsWidget::on_saveBtn_clicked()
{
    // Save the settings
    setVisible(false);
}

void SettingsWidget::on_cancelBtn_clicked()
{
    // Restore the settings
    setVisible(false);
}
